// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2019 Christoph Hellwig.
 * Copyright (c) 2019 Western Digital Corporation or its affiliates.
 */
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/clk.h>
#include <asm/soc.h>

static int ae350_sysctl_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct clk *pclk;
	int ret;

	dev_info(dev, "ae350 system controller\n");

	/* Populate children */
	ret = devm_of_platform_populate(dev);
	if (ret)
		dev_err(dev, "Populate platform failed %d\n", ret);

	return ret;
}

static const struct of_device_id ae350_sysctl_of_match[] = {
	{ .compatible = "gowin,ae350-sysctl", },
	{ /* sentinel */ },
};

static struct platform_driver ae350_sysctl_driver = {
	.driver	= {
		.name		= "ae350-sysctl",
		.of_match_table	= ae350_sysctl_of_match,
	},
	.probe			= ae350_sysctl_probe,
};
builtin_platform_driver(ae350_sysctl_driver);

static void __init ae350_soc_early_init(const void *fdt)
{
}
SOC_EARLY_INIT_DECLARE(ae350_soc, "gowin,ae350", ae350_soc_early_init);
